﻿using USNetFramework.Network;

namespace USNetFramework.PacketBuilder
{
    public interface IPacketBuilder
    {
        void Reset();

        byte[] Encode(NetPacket packet);

        NetPacket Decode(byte[] data, int len);

        byte[] Decrypt(byte[] bytes, EnumEncryptType eet = EnumEncryptType.XXTea);

        byte[] Encrypt(byte[] bytes, EnumEncryptType eet = EnumEncryptType.XXTea);

        NetPacket Pack(NetMsg proto);

        void Unpack(NetPacket packet);
    }
}
